\(\int x^2 \sqrt {a^2+2 a b x^3+b^2 x^6} \, dx\) [9]

   Optimal result
   Rubi [A] (verified)
   Mathematica [B] (verified)
   Maple [C] (warning: unable to verify)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [B] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 26, antiderivative size = 36 \[ \int x^2 \sqrt {a^2+2 a b x^3+b^2 x^6} \, dx=\frac {\left (a+b x^3\right ) \sqrt {a^2+2 a b x^3+b^2 x^6}}{6 b} \]

[Out]

1/6*(b*x^3+a)*((b*x^3+a)^2)^(1/2)/b

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.077, Rules used = {1366, 623} \[ \int x^2 \sqrt {a^2+2 a b x^3+b^2 x^6} \, dx=\frac {\left (a+b x^3\right ) \sqrt {a^2+2 a b x^3+b^2 x^6}}{6 b} \]

[In]

Int[x^2*Sqrt[a^2 + 2*a*b*x^3 + b^2*x^6],x]

[Out]

((a + b*x^3)*Sqrt[a^2 + 2*a*b*x^3 + b^2*x^6])/(6*b)

Rule 623

Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(b + 2*c*x)*((a + b*x + c*x^2)^p/(2*c*(2*p + 1)
)), x] /; FreeQ[{a, b, c, p}, x] && EqQ[b^2 - 4*a*c, 0] && NeQ[p, -2^(-1)]

Rule 1366

Int[(x_)^(m_.)*((a_) + (c_.)*(x_)^(n2_.) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Dist[1/n, Subst[Int[(a + b*x +
 c*x^2)^p, x], x, x^n], x] /; FreeQ[{a, b, c, m, n, p}, x] && EqQ[n2, 2*n] && EqQ[Simplify[m - n + 1], 0]

Rubi steps \begin{align*} \text {integral}& = \frac {1}{3} \text {Subst}\left (\int \sqrt {a^2+2 a b x+b^2 x^2} \, dx,x,x^3\right ) \\ & = \frac {\left (a+b x^3\right ) \sqrt {a^2+2 a b x^3+b^2 x^6}}{6 b} \\ \end{align*}

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(88\) vs. \(2(36)=72\).

Time = 0.33 (sec) , antiderivative size = 88, normalized size of antiderivative = 2.44 \[ \int x^2 \sqrt {a^2+2 a b x^3+b^2 x^6} \, dx=\frac {x^3 \left (2 a+b x^3\right ) \left (\sqrt {a^2} b x^3+a \left (\sqrt {a^2}-\sqrt {\left (a+b x^3\right )^2}\right )\right )}{-6 a^2-6 a b x^3+6 \sqrt {a^2} \sqrt {\left (a+b x^3\right )^2}} \]

[In]

Integrate[x^2*Sqrt[a^2 + 2*a*b*x^3 + b^2*x^6],x]

[Out]

(x^3*(2*a + b*x^3)*(Sqrt[a^2]*b*x^3 + a*(Sqrt[a^2] - Sqrt[(a + b*x^3)^2])))/(-6*a^2 - 6*a*b*x^3 + 6*Sqrt[a^2]*
Sqrt[(a + b*x^3)^2])

Maple [C] (warning: unable to verify)

Result contains higher order function than in optimal. Order 9 vs. order 2.

Time = 0.09 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.64

method result size
pseudoelliptic \(\frac {\left (b \,x^{3}+a \right )^{2} \operatorname {csgn}\left (b \,x^{3}+a \right )}{6 b}\) \(23\)
default \(\frac {\left (b \,x^{3}+a \right ) \sqrt {\left (b \,x^{3}+a \right )^{2}}}{6 b}\) \(24\)
risch \(\frac {\left (b \,x^{3}+a \right ) \sqrt {\left (b \,x^{3}+a \right )^{2}}}{6 b}\) \(24\)
gosper \(\frac {x^{3} \left (b \,x^{3}+2 a \right ) \sqrt {\left (b \,x^{3}+a \right )^{2}}}{6 b \,x^{3}+6 a}\) \(35\)

[In]

int(x^2*((b*x^3+a)^2)^(1/2),x,method=_RETURNVERBOSE)

[Out]

1/6*(b*x^3+a)^2*csgn(b*x^3+a)/b

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 13, normalized size of antiderivative = 0.36 \[ \int x^2 \sqrt {a^2+2 a b x^3+b^2 x^6} \, dx=\frac {1}{6} \, b x^{6} + \frac {1}{3} \, a x^{3} \]

[In]

integrate(x^2*((b*x^3+a)^2)^(1/2),x, algorithm="fricas")

[Out]

1/6*b*x^6 + 1/3*a*x^3

Sympy [F]

\[ \int x^2 \sqrt {a^2+2 a b x^3+b^2 x^6} \, dx=\int x^{2} \sqrt {\left (a + b x^{3}\right )^{2}}\, dx \]

[In]

integrate(x**2*((b*x**3+a)**2)**(1/2),x)

[Out]

Integral(x**2*sqrt((a + b*x**3)**2), x)

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 52 vs. \(2 (23) = 46\).

Time = 0.22 (sec) , antiderivative size = 52, normalized size of antiderivative = 1.44 \[ \int x^2 \sqrt {a^2+2 a b x^3+b^2 x^6} \, dx=\frac {1}{6} \, \sqrt {b^{2} x^{6} + 2 \, a b x^{3} + a^{2}} x^{3} + \frac {\sqrt {b^{2} x^{6} + 2 \, a b x^{3} + a^{2}} a}{6 \, b} \]

[In]

integrate(x^2*((b*x^3+a)^2)^(1/2),x, algorithm="maxima")

[Out]

1/6*sqrt(b^2*x^6 + 2*a*b*x^3 + a^2)*x^3 + 1/6*sqrt(b^2*x^6 + 2*a*b*x^3 + a^2)*a/b

Giac [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.61 \[ \int x^2 \sqrt {a^2+2 a b x^3+b^2 x^6} \, dx=\frac {1}{6} \, {\left (b x^{6} + 2 \, a x^{3}\right )} \mathrm {sgn}\left (b x^{3} + a\right ) \]

[In]

integrate(x^2*((b*x^3+a)^2)^(1/2),x, algorithm="giac")

[Out]

1/6*(b*x^6 + 2*a*x^3)*sgn(b*x^3 + a)

Mupad [B] (verification not implemented)

Time = 8.40 (sec) , antiderivative size = 33, normalized size of antiderivative = 0.92 \[ \int x^2 \sqrt {a^2+2 a b x^3+b^2 x^6} \, dx=\left (\frac {a}{6\,b}+\frac {x^3}{6}\right )\,\sqrt {a^2+2\,a\,b\,x^3+b^2\,x^6} \]

[In]

int(x^2*((a + b*x^3)^2)^(1/2),x)

[Out]

(a/(6*b) + x^3/6)*(a^2 + b^2*x^6 + 2*a*b*x^3)^(1/2)